const { BrowserWindow, app } = require("electron");
const { theme } = require("./unified");
app.whenReady().then(() => {
  let mainWin = new BrowserWindow({
    width: 800,
    height: 600,
    show: false,
    title: theme,
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false,
      enableRemoteModule: true
    }
  });
  mainWin.loadFile(`./${theme}/index.html`);
  mainWin.on("ready-to-show", () => mainWin.show());
  mainWin.on("close", () => mainWin = null);
  require("@electron/remote/main").initialize();
  require("@electron/remote/main").enable(mainWin.webContents);
});
